if(PkgConfig_FOUND)
    pkg_check_modules(opengl QUIET IMPORTED_TARGET opengl)
    pkg_check_modules(glu QUIET IMPORTED_TARGET glu)
    pkg_check_modules(x11 QUIET IMPORTED_TARGET x11)
    set(packages PkgConfig::glu glut PkgConfig::opengl PkgConfig::x11)
endif()

if(opengl_FOUND)
    build_all_target(${packages})
else()
    get_filename_component(CURRENT_DIR_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
    message(STATUS "${packages} not found! Skipping ${CURRENT_DIR_NAME}")
endif()
